package com.serkol.ams.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/**
 * 
 * @TableName agent_invitation_relationship
 */
@TableName(value ="agent_invitation_relationship")
@Data
public class AgentInvitationRelationship {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long relationAgentId;

    /**
     * 
     */
    private Long agentId;

    /**
     * 
     */
    private Long upgradeAgentId;

    /**
     * 
     */
    private Long currentUpgradeAgentId;

    /**
     * 
     */
    private Long goodsId;

    /**
     * 
     */
    private BigDecimal price;

    /**
     * 
     */
    private BigDecimal upgradePrice;

    /**
     * 
     */
    private BigDecimal parentPrice;

    /**
     * 
     */
    private BigDecimal reduceUpgradePrice;

    /**
     * 
     */
    private BigDecimal level1;

    /**
     * 
     */
    private BigDecimal level2;

    /**
     * 
     */
    private BigDecimal level3;

    /**
     * 
     */
    private BigDecimal level4;

    /**
     * 
     */
    private Integer type;

    /**
     * 
     */
    private Integer deleted;

    /**
     * 
     */
    private Date createDate;

    /**
     * 
     */
    private Date updateDate;

    /**
     * 
     */
    private Integer state;

    /**
     * 
     */
    private Integer isActivty;

    /**
     * 
     */
    private Integer isPrice;

    /**
     * 
     */
    private Integer isParent;

    /**
     * 
     */

    private Integer isLevel;

    /**
     * 
     */
    private Long categoryId;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AgentInvitationRelationship other = (AgentInvitationRelationship) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRelationAgentId() == null ? other.getRelationAgentId() == null : this.getRelationAgentId().equals(other.getRelationAgentId()))
            && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
            && (this.getUpgradeAgentId() == null ? other.getUpgradeAgentId() == null : this.getUpgradeAgentId().equals(other.getUpgradeAgentId()))
            && (this.getCurrentUpgradeAgentId() == null ? other.getCurrentUpgradeAgentId() == null : this.getCurrentUpgradeAgentId().equals(other.getCurrentUpgradeAgentId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getUpgradePrice() == null ? other.getUpgradePrice() == null : this.getUpgradePrice().equals(other.getUpgradePrice()))
            && (this.getParentPrice() == null ? other.getParentPrice() == null : this.getParentPrice().equals(other.getParentPrice()))
            && (this.getReduceUpgradePrice() == null ? other.getReduceUpgradePrice() == null : this.getReduceUpgradePrice().equals(other.getReduceUpgradePrice()))
            && (this.getLevel1() == null ? other.getLevel1() == null : this.getLevel1().equals(other.getLevel1()))
            && (this.getLevel2() == null ? other.getLevel2() == null : this.getLevel2().equals(other.getLevel2()))
            && (this.getLevel3() == null ? other.getLevel3() == null : this.getLevel3().equals(other.getLevel3()))
            && (this.getLevel4() == null ? other.getLevel4() == null : this.getLevel4().equals(other.getLevel4()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getIsActivty() == null ? other.getIsActivty() == null : this.getIsActivty().equals(other.getIsActivty()))
            && (this.getIsPrice() == null ? other.getIsPrice() == null : this.getIsPrice().equals(other.getIsPrice()))
            && (this.getIsParent() == null ? other.getIsParent() == null : this.getIsParent().equals(other.getIsParent()))
            && (this.getIsLevel() == null ? other.getIsLevel() == null : this.getIsLevel().equals(other.getIsLevel()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRelationAgentId() == null) ? 0 : getRelationAgentId().hashCode());
        result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
        result = prime * result + ((getUpgradeAgentId() == null) ? 0 : getUpgradeAgentId().hashCode());
        result = prime * result + ((getCurrentUpgradeAgentId() == null) ? 0 : getCurrentUpgradeAgentId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getUpgradePrice() == null) ? 0 : getUpgradePrice().hashCode());
        result = prime * result + ((getParentPrice() == null) ? 0 : getParentPrice().hashCode());
        result = prime * result + ((getReduceUpgradePrice() == null) ? 0 : getReduceUpgradePrice().hashCode());
        result = prime * result + ((getLevel1() == null) ? 0 : getLevel1().hashCode());
        result = prime * result + ((getLevel2() == null) ? 0 : getLevel2().hashCode());
        result = prime * result + ((getLevel3() == null) ? 0 : getLevel3().hashCode());
        result = prime * result + ((getLevel4() == null) ? 0 : getLevel4().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getIsActivty() == null) ? 0 : getIsActivty().hashCode());
        result = prime * result + ((getIsPrice() == null) ? 0 : getIsPrice().hashCode());
        result = prime * result + ((getIsParent() == null) ? 0 : getIsParent().hashCode());
        result = prime * result + ((getIsLevel() == null) ? 0 : getIsLevel().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", relationAgentId=").append(relationAgentId);
        sb.append(", agentId=").append(agentId);
        sb.append(", upgradeAgentId=").append(upgradeAgentId);
        sb.append(", currentUpgradeAgentId=").append(currentUpgradeAgentId);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", price=").append(price);
        sb.append(", upgradePrice=").append(upgradePrice);
        sb.append(", parentPrice=").append(parentPrice);
        sb.append(", reduceUpgradePrice=").append(reduceUpgradePrice);
        sb.append(", level1=").append(level1);
        sb.append(", level2=").append(level2);
        sb.append(", level3=").append(level3);
        sb.append(", level4=").append(level4);
        sb.append(", type=").append(type);
        sb.append(", deleted=").append(deleted);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", state=").append(state);
        sb.append(", isActivty=").append(isActivty);
        sb.append(", isPrice=").append(isPrice);
        sb.append(", isParent=").append(isParent);
        sb.append(", isLevel=").append(isLevel);
        sb.append(", categoryId=").append(categoryId);
        sb.append("]");
        return sb.toString();
    }
}